<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>班级</title>
    <meta name="context-path" th:content="@{/}"/>
    <link rel="stylesheet" th:href="@{/resources/matrix/css/bootstrap.min.css}"/>
    <link rel="stylesheet" th:href="@{/resources/matrix/css/bootstrap-responsive.min.css}"/>
    <link rel="stylesheet" th:href="@{/resources/matrix/css/matrix-style.css}"/>
    <link rel="stylesheet" th:href="@{/resources/matrix/css/matrix-media.css}"/>
    <link rel="stylesheet" th:href="@{/resources/matrix/css/matrix-full.css}"/>
    <link rel="stylesheet" th:href="@{/resources/jquery-easyui/themes/metro/easyui.css}" />
    <link rel="stylesheet" th:href="@{/resources/matrix/font-awesome/css/font-awesome.css}"/>
    <link rel="stylesheet" th:href="@{/resources/layui/css/layui.css}" media="all">
    <link rel="stylesheet" th:href="@{/resources/css/website.css}"/>
</head>
<body class="childbody">
<div class="container-fluid">
    <!--Chart-box-->
    <div class="row-fluid">
        <div class="widget-box">
            <!--<div class="widget-title bg_lg"><span class="icon"><i class="icon-search"></i></span>
                <h5>查询</h5>
            </div>
            <div class="widget-content nopadding">
            <form id="queryform" action="#" method="get" class="form-horizontal query-form">
                <div class="row-fluid query-row">
                    <div class="span3">
                        <div class="control-group">
                            <label class="control-label query-control-label">机构名称</label>
                            <div class="controls query-controls">
                                <input type="text" name="name" class="span11" placeholder="请输入机构名称">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="form-actions">
                    <button id="btnSearch" type="button" class="btn btn-primary">查询</button>
                </div>
            </form>
        </div>
        </div>-->
        <!--End-Chart-box-->
        <div class="row-fluid">
            <div class="span12">
                <div class="widget-box">
                    <div class="widget-title"><span class="icon"> <i class="icon-th"></i> </span>
                        <h5>班级</h5>
                    </div>
                    <div class="widget-content nopadding">
                        <div class="table_actions">
                            <button id="btnEdit"  type="button"  class="btn btn-info">课表编辑</button>
                        </div>
                        <table id="tablelist" class="layui-table">
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script th:src="@{/resources/matrix/js/jquery.min.js}"></script>
<script th:src="@{/resources/matrix/js/jquery.ui.custom.js}"></script>
<script th:src="@{/resources/matrix/js/bootstrap.min.js}"></script>
<script th:src="@{/resources/matrix/js/matrix.js}"></script>
<script th:src="@{/resources/jquery-easyui/jquery.easyui.min.js}"></script>
<script th:src="@{/resources/js/website.js}"></script>
<script th:src="@{/resources/layui/layui.all.js}" charset="utf-8"></script>
<script th:src="@{/resources/js/system.js}"></script>
<script th:inline="javascript">
    /*<![CDATA[*/
    $(document).keyup(function (event) {
        if (event.keyCode == 13) {
            search();
        }
    });
    /*]]>*/
</script>

<script th:inline="javascript">
    /*<![CDATA[*/
    var query, add, edit, del;
    layui.use(['jquery', 'layer', 'laydate'], function () {
        var $ = layui.jquery,
            layer = layui.layer,
            table = layui.table;

        lay('.date').each(function () {
            laydate.render({
                elem: this
            });
        });

        var cols = [
            [
                {field:'name',title:'名称',width:'40%'},
                {field:'description',title:'描述',width:'30%'},
                {field:'treeLevel',title:'级别',width:'24%'}
            ]
        ];

        query = new TreeListQuery(table, {
            cols: cols,
            element: "#tablelist",
            url: contextRoot + "jwOrg/doListTreeOrgByUser",
            page: 1,
            single:true,
            tableid: "user_list_table",
            extraData: function () {
                return $("#queryform").serializeObject();
            }
        })
        query.reload();

        edit = new ListEdit(layer, {
            title: "修改课表",
            url: contextRoot + "timeTableBack/getEditTimeTable",
            width: "1000px",
            isfull:true,
            height: "600px"
        }, query);

        $("#btnSearch").bind("click", function (event) {
            query.reload();
        });

        $("#btnEdit").bind("click", function (event) {
            edit.openDialog();
        });

    });

    /*]]>*/
</script>
</body>
</html>